<template>
  <div>{{number}}</div>
</template>

<script>
export default {
  props: ["number"],
  watch: {
    number: {
      handler(newName, oldName) {
        console.log(newName);
      },
      deep: true, //深度监听 多维
      immediate: true, //立即执行
    },
  },
};
</script>

<style>
</style>